package day0228;

public class indexOfDemo {
    public static void main(String[] args) {
        String line ="我爱Java";
        int line1= line.indexOf("爱",1);
        System.out.println(line1);
        int line2= line.lastIndexOf("a");
        System.out.println(line2);
    }
}
